<!-- 导入失败 -->
<template>
    <el-dialog title="导入失败" :visible.sync="windowVisible" width="80%" :close-on-click-modal="false">
        <div class="table-container table-css">
            <el-table :data="errorData.errorData" border style="width: 90%" class="table-data" :header-cell-style="{background:'#edf2f9','border-color': '#c7d7eb'}"  >
                <el-table-column prop="scoreOrder" label="序号" align="center" width="80">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'scoreOrder').length>0?'red':''">{{scope.row.scoreOrder}}</span>
                </el-table-column>
                <el-table-column prop="studentName" label="姓名" align="center">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'studentName').length>0?'red':''">{{scope.row.studentName}}</span>
                </el-table-column>
                <el-table-column prop="gender" label="性别" align="center" width="80">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'gender').length>0?'red':''">{{scope.row.gender}}</span>
                </el-table-column>
                <el-table-column prop="dept" label="院系" align="center" >
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'dept').length>0?'red':''">{{scope.row.dept}}</span>
                </el-table-column>
                <el-table-column prop="className" label="专业班次" align="center">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'className').length>0?'red':''">{{scope.row.className}}</span>
                </el-table-column>
                <el-table-column prop="studentCode" label="学号" align="center" >
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'studentCode').length>0?'red':''">{{scope.row.studentCode}}</span>
                </el-table-column>
                <el-table-column v-if="errorData.isFixed" prop="examNumber" label="准考证号" align="center">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'examNumber').length>0?'red':''">{{scope.row.certificate}}</span>
                </el-table-column>
                <el-table-column v-if="!errorData.isFixed" prop="idCard" label="身份证号" align="center">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'idCard').length>0?'red':''">{{scope.row.idCard}}</span>
                </el-table-column>
                <el-table-column prop="rddate" v-if="!errorData.isFixed" label="考试成绩" align="center">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'idCard').length>0?'red':''">{{scope.row.idCard}}</span>
                </el-table-column>
                <el-table-column prop="standard" v-if="!errorData.isFixed" label="标准" align="center">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'standard').length>0?'red':''">{{scope.row.standard}}</span>
                </el-table-column>
                <el-table-column prop="certificate" v-if="!errorData.isFixed" label="证书编号" align="center">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'certificate').length>0?'red':''">{{scope.row.certificate}}</span>
                </el-table-column>
                <el-table-column prop="reportNumber" v-if="errorData.isFixed" label="成绩单号" align="center">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'reportNumber').length>0?'red':''">{{scope.row.reportNumber}}</span>
                </el-table-column>
                <el-table-column prop="totalPoints" v-if="errorData.isFixed" label="总分" align="center" width="80">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'totalPoints').length>0?'red':''">{{scope.row.totalPoints}}</span>
                </el-table-column>
                <el-table-column prop="hearing" v-if="errorData.isFixed" label="听力" align="center" width="80">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'hearing').length>0?'red':''">{{scope.row.hearing}}</span>
                </el-table-column>
                <el-table-column prop="reading" v-if="errorData.isFixed" label="阅读" align="center" width="80">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'reading').length>0?'red':''">{{scope.row.reading}}</span>
                </el-table-column>
                <el-table-column prop="synthesis" v-if="errorData.isFixed" label="综合" align="center" width="80">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'synthesis').length>0?'red':''">{{scope.row.synthesis}}</span>
                </el-table-column>
                <el-table-column prop="writing" v-if="errorData.isFixed" label="作文" align="center" width="80">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'writing').length>0?'red':''">{{scope.row.writing}}</span>
                </el-table-column>
                <el-table-column prop="speaking" v-if="errorData.isFixed" label="口语" align="center" width="80">
                    <span slot-scope="scope" :class="scope.row.errorList.filter(item=>item == 'speaking').length>0?'red':''">{{scope.row.speaking}}</span>
                </el-table-column>
            </el-table>
            <div class="search-button edit-green" @click="saveDialog">确定</div>
        </div>
    </el-dialog>
</template>
<script>
export default {
  data() {
    return {
        windowVisible:false
    };
  },
  props:{
    errorData:{
        default:()=>{}
    }
  },
  methods: {
    saveDialog(){
        this.windowVisible = false
    }
  },
};
</script>
<style lang="less" scoped>
.table-css {
  margin-top: 30px;
  /deep/.el-table td,
  .el-table th.is-leaf,
  .el-table--border,
  .el-table--group {
    border-color: #c7d7eb;
  }

 /deep/ .el-table__header tr,
  .el-table__header th {
    padding: 0;
    height: 76px;
    background-color: #edf2f9;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    line-height: 20px;
    color: #004ca7;
  }

  /deep/.el-table__body tr,
  .el-table__body td {
    padding: 0;
    height: 86px;
  }
}
</style>

<style lang="less" scoped>
@import "../../../styles/commonCss.less";
.table-data{margin: 0 auto 40px;}
.edit-green{
    background: #F1FFF8;
    border: 1px solid #02C86C;
    color: #02C86C;
    width: 70px;
    margin: 0 auto;
}
.red{
    color: #FF3819;
}
</style>

